package com.itrencai.d2_package.abstractdemo;

public class Test {
    public static void main(String[] args) {
        GoldCard c=new GoldCard();
        c.setMoney(10000);//父类的
        c.setName("zh");
        c.pay(300);
        System.out.println("余额："+c.getMoney());

        SilverCard c2=new SilverCard();
        c2.setMoney(10000);
        c2.setName("ls");
        c2.pay(300);
        System.out.println("余额："+c2.getMoney());
    }
}
